﻿namespace battlenet.wow.rt.domain.objects
{
    public class Statistic
    {
        /// <summary>
        /// Gets or sets the stat identifier.
        /// </summary>
        /// <value>
        /// The stat identifier.
        /// </value>
        public int StatId { get; set; }

        /// <summary>
        /// Gets or sets the type of the stat.
        /// </summary>
        /// <value>
        /// The type of the stat.
        /// </value>
        public StatType StatType { get; set; }

        /// <summary>
        /// Gets or sets the stat value.
        /// </summary>
        /// <value>
        /// The stat value.
        /// </value>
        public int StatValue { get; set; }

        /// <summary>
        /// Initializes a new instance of the <see cref="Statistic"/> class.
        /// </summary>
        public Statistic() { }

        /// <summary>
        /// Initializes a new instance of the <see cref="Statistic"/> class.
        /// </summary>
        /// <param name="id">The identifier.</param>
        /// <param name="value">The value.</param>
        public Statistic(int id, int value)
        {
            StatId = id;
            StatValue = value;
            StatType = (StatType) id;
        }

        public override string ToString()
        {
            return string.Format("+{0} {1}", StatValue, StatType);
        }
    }
}